Chomu's Blog.

>

Posts

GitHub

11월 07일 원티드 프리온보딩 백엔드 12일차 TIL

목차

:one: 진행상황

:two: 진행상황리뷰

# data/models.py
 
class Sewer(models.Model):
    idn = models.CharField()
    gubn = models.CharField()
    gubn_nam = models.CharField()
    remark = models.CharField()
 
 
class Sewage(models.Model):
    sewer = models.ForeignKey(Sewer, on_delete=models.CASCADE)
    mea_ymd = models.DateTimeField()
    mea_wal = models.DecimalField()
    sig_sta = models.CharField()
 
 
class Rainguage(models.Model):
    rainguage_code = models.SmallIntegerField()
    rainguage_name = models.CharField()
    gu_code = models.SmallIntegerField()
    gu_name = models.CharField()
 
 
class Rainfall(models.Model):
    rainguage = models.ForeignKey(Rainguage, on_delete=models.CASCADE)
    rainfall10 = models.FloatField()
    recieve_time = models.DateTimeField()

:three: Today I Learned

Custom django-admin Command